import 'package:flutter/material.dart';
import 'package:flutter_deer/account/iview/agent_user_betting_summary_iview.dart';
import 'package:flutter_deer/account/models/agent_user_betting_entity.dart';
import 'package:flutter_deer/mvp/base_page_presenter.dart';
import 'package:flutter_deer/net/base_entity.dart';
import 'package:flutter_deer/net/dio_utils.dart';
import 'package:flutter_deer/net/http_api.dart';


class AgentUserBettingSummaryPresenter extends BasePagePresenter<AgentUserBettingSummaryIMvpView> {

  @override
  void initState() {
  }

  Future<dynamic> getAgentUserBettingSummaryData() async {
    WidgetsBinding.instance.addPostFrameCallback((_) {
      requestNetwork<BaseEntity<AgentUserBettingSummaryPoolEntity>>(Method.get,
          url: HttpApi.agentUserBettingSummaryList,
          onSuccess: (data) {
            view.setSummaryData(data?.data);
          },
          onError: (code, msg) {

          }
      );
    });
  }
}